<?php
if (!init()) {
  redirect('action=login');
}

if ($_GET['like'] != '') {
  likeImage($_GET['iid']);
} else if ($_GET['dislike'] != '') {
  dislikeImage($_GET['iid']);
}

$initiatorAction = \controller\ControllerUtil::getEncodedActionFromUrlWithParameters($_SERVER['HTTP_REFERER']);

redirect("?action=msg&header=header.like.success&body=body.like.success&view=" . $initiatorAction);
